package com.lhb.boyixue.base;



import com.lhb.boyixue.user.interceptor.UserJwtTokenHandlerInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author 86131
 * @version 1.0
 * @description 配置
 * @date 2025/4/24 下午9:13
 */
@Configuration
@Slf4j
public class WebMvcConfigure extends WebMvcConfigurationSupport {
    @Autowired
    UserJwtTokenHandlerInterceptor userJwtTokenHandlerInterceptor;

    /**
     * 注册自定义拦截器
     * @param registry
     */
    protected void addInterceptors(InterceptorRegistry registry){
        log.info("开始注册自定义拦截器");
//        registry.addInterceptor(userJwtTokenHandlerInterceptor).excludePathPatterns("/user/login");
//        .addPathPatterns("/api/**")
//        .excludePathPatterns("/api/admin/auth/**")
//        .excludePathPatterns("/api/teacher/auth/**")
//        .excludePathPatterns("/api/student/auth/**");
    }
}
